import uuid
import pathlib
import os

class Config(object):
    '''Flask配置'''
    SECRECT_KEY = str(uuid.uuid4())
    SQLALCHEMY_DATABASE_URI = f'sqlite:///{os.path.dirname(__file__)}/watchdog.sqlite3'
    UPLOAD_FOLDER = pathlib.Path(__file__).parent.joinpath('upload').resolve()
    if not os.path.isdir(UPLOAD_FOLDER):
        os.mkdir(UPLOAD_FOLDER)